﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WFONE
{
    public partial class Double02 : Form
    {
        public Double02()
        {
            InitializeComponent();
        }
        private bool inputData()//输入数据
        {
            if (inputBool() == true)
            {
                try
                {
                    CList.cInputListDl.dGs = Math.Round(double.Parse(tBGs.Text));
                    CList.cInputListDl.dX10 = Math.Round(double.Parse(tBX10.Text));
                    CList.cInputListDl.dX20 = Math.Round(double.Parse(tBX20.Text));
                    CList.cInputListDl.dX11 = Math.Round(double.Parse(tBX11.Text));
                    CList.cInputListDl.dX12 = Math.Round(double.Parse(tBX12.Text));
                    CList.cInputListDl.dX13 = Math.Round(double.Parse(tBX13.Text));
                    CList.cInputListDl.dX21 = Math.Round(double.Parse(tBX21.Text));
                    CList.cInputListDl.dX22 = Math.Round(double.Parse(tBX22.Text));
                    CList.cInputListDl.dX23 = Math.Round(double.Parse(tBX23.Text));
                    CList.cInputListDl.dY11 = Math.Round(double.Parse(tBY11.Text));
                    CList.cInputListDl.dY12 = Math.Round(double.Parse(tBY12.Text));
                    CList.cInputListDl.dY13 = Math.Round(double.Parse(tBY13.Text));
                    CList.cInputListDl.dY21 = Math.Round(double.Parse(tBY21.Text));
                    CList.cInputListDl.dY22 = Math.Round(double.Parse(tBY22.Text));
                    CList.cInputListDl.dY23 = Math.Round(double.Parse(tBY23.Text));
                }              
                 catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }                                                                        
                return true;

            }
            else
            {
                MessageBox.Show("请输入完整数据", "提示信息", MessageBoxButtons.OK);
                return false;
            }
        }
        public bool inputBool()//输入数据完整提示
        {
            if (   tBX11.Text == "" || tBX12.Text == "" || tBX13.Text == "" 
                || tBX21.Text == "" || tBX22.Text == "" || tBX23.Text == ""
                || tBY11.Text == "" || tBY12.Text == "" || tBY13.Text == ""
                || tBY21.Text == "" || tBY22.Text == "" || tBY23.Text == ""
                || tBGs.Text == "" || tBX10.Text == "" || tBX20.Text == "")
            {
                return false;
            }
            else
            {
                return true;
            }
        }

        private void Link_to_Double03_Click(object sender, EventArgs e)
        {           
                if(inputData())
            {
                Double03 cDouble03 = new Double03();
                cDouble03.Visible = false;
                cDouble03.ShowDialog();
            }
               
            
        }
    }
}
